<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑学员 - ${bean.name }</title>
<c:import url="/WEB-INF/jsp/head.jsp" />
<script type="text/javascript" src="static/js/bootstrap-table.min.js"></script>
<script type="text/javascript"
	src="static/js/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="static/js/student/add.js"></script>
<link rel="stylesheet" href="static/css/bootstrap-table.min.css">
<link rel="stylesheet"
	href="static/css/bootstrap-datetimepicker.min.css">
<script type="text/javascript"
	src="static/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript"
	src="static/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
</head>
<body>
	<div class="default-theme container-fluid iframe">
		<div class="col-md-8">
			<form id="student-form" class="form-horizontal" action="student/edit"
				method="post">
				<div class="form-group">
					<label for="id" class="col-sm-2 control-label"><i
						class="text-danger">*</i> 学员编号</label> <input type="hidden" name="id"
						value="${bean.id }" />
					<div class="col-sm-10">
						<input type="text" class="form-control" readonly="readonly"
							placeholder="学员编号" value="${bean.id }">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">内部编号</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" readonly="readonly"
							placeholder="内部编号" value="${bean.innerId }" />
					</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label"><i
						class="text-danger">*</i> 学员姓名</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="name"
							placeholder="学员姓名" value="${bean.name }">
					</div>
				</div>
				<div class="form-group">
					<label for="sex" class="col-sm-2 control-label"><i
						class="text-danger">*</i> 性别</label>
					<div class="col-sm-10">
						<select class="form-control" name="sex">
							<option value="0"
								<c:if test="${0 == bean.sex }">selected="selected"</c:if>>男</option>
							<option value="1"
								<c:if test="${1 == bean.sex }">selected="selected"</c:if>>女</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="textBoxId" class="col-sm-2 control-label"> 教材编号</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="textBoxId"
							placeholder="教材编号" value="${bean.textBoxId }" />
					</div>
				</div>
				<div class="form-group">
					<label for="idNumber" class="col-sm-2 control-label"><i
						class="text-danger">*</i> 身份证号</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="idNumber"
							placeholder="身份证号" value="${bean.idNumber }" />
					</div>
				</div>
				<div class="form-group">
					<label for="tel" class="col-sm-2 control-label"> <i
						class="text-danger">*</i> 联系电话
					</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="tel"
							placeholder="联系电话" value="${bean.tel }">
					</div>
				</div>
				<div class="form-group">
					<label for="education" class="col-sm-2 control-label"> <i
						class="text-danger">*</i> 学历信息
					</label>
					<div class="col-sm-10">
						<select class="form-control" name="education.value">
							<c:forEach items="${educations }" var="item">
								<option value="${item.value }"
									<c:if test="${item.value == bean.education.value }">selected="selected"</c:if>>${item.name }</option>
							</c:forEach>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="school" class="col-sm-2 control-label"> <i
						class="text-danger">*</i> 毕业学校
					</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="school"
							placeholder="毕业学校" value="${bean.school }" />
					</div>
				</div>
				<div class="form-group">
					<label for="major" class="col-sm-2 control-label"> <i
						class="text-danger">*</i> 毕业专业
					</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="major"
							placeholder="毕业专业" value="${bean.major }" />
					</div>
				</div>
				<div class="form-group">
					<label for="address" class="col-sm-2 control-label"> <i
						class="text-danger">*</i> 通信地址
					</label>
					<div class="col-sm-10">
						<textarea class="form-control" name="address" placeholder="通信地址">${bean.address }</textarea>
					</div>
				</div>
				<div class="form-group">
					<label for="emergent" class="col-sm-2 control-label"> 紧急联系人
					</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="emergent"
							placeholder="紧急联系人" value="${bean.emergent }" />
					</div>
				</div>
				<div class="form-group">
					<label for="emergentContact" class="col-sm-2 control-label">
						紧急联系人联系方式 </label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="emergentContact"
							placeholder="紧急联系人联系方式" value="${bean.emergentContact }" />
					</div>
				</div>
				<div class="form-group">
					<label for="previousJob" class="col-sm-2 control-label">
						之前工作 </label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="previousJob"
							placeholder="之前工作" value="${bean.previousJob }" />
					</div>
				</div>
				<div class="form-group">
					<label for="joinWay" class="col-sm-2 control-label"> 报名方式 </label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="joinWay"
							placeholder="报名方式" value="${bean.joinWay }" />
					</div>
				</div>
				<div class="form-group">
					<label for="joinDate" class="col-sm-2 control-label"> 报名时间
					</label>
					<div class="col-sm-10">
						<input type="text" class="form-control datetimepicker"
							readonly="readonly" name="joinDate" placeholder="点击选择时间"
							value="<fmt:formatDate pattern="yyyy-MM-dd" value="${bean.joinDate }" />" />
					</div>
				</div>
				<div class="form-group">
					<label for="intentionalCity" class="col-sm-2 control-label">
						<i class="text-danger">*</i> 意向城市
					</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="intentionalCity"
							placeholder="意向城市" value="${bean.intentionalCity }" />
					</div>
				</div>
				<div class="form-group">
					<label for="email" class="col-sm-2 control-label"> <i
						class="text-danger">*</i> 电子邮箱
					</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="email"
							placeholder="电子邮箱" value="${bean.email }" />
					</div>
				</div>
				<div class="form-group">
					<label for="passCheck" class="col-sm-2 control-label"> <i
						class="text-danger">*</i> 通行证
					</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="passCheck"
							placeholder="通行证" value="${bean.passCheck }" />
					</div>
				</div>
				<div class="form-group">
					<label for="jobIntention" class="col-sm-2 control-label">学习方向</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="jobIntention"
							placeholder="学习方向" value="${bean.jobIntention }" />
					</div>
				</div>
				<div class="form-group">
					<label for="abnormal" class="col-sm-2 control-label">异常情况</label>
					<div class="col-sm-10">
						<textarea class="form-control" name="abnormal" placeholder="异常情况">${bean.abnormal }</textarea>
					</div>
				</div>
				<div class="form-group">
					<label for="evaluate" class="col-sm-2 control-label">评价</label>
					<div class="col-sm-10">
						<textarea class="form-control" name="evaluate" placeholder="评价">${bean.evaluate }</textarea>
					</div>
				</div>
				<div class="form-group">
					<label for="remarks" class="col-sm-2 control-label">备注</label>
					<div class="col-sm-10">
						<textarea class="form-control" name="remarks" placeholder="备注">${bean.remarks }</textarea>
					</div>
				</div>
				<div class="form-group">
					<label for="className" class="col-sm-2 control-label"> 班级 </label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="classes.name"
							placeholder="点击选择班级" readonly="readonly" data-toggle="modal"
							data-target="#classSelect" value="${bean.classes.name }" />
					</div>
				</div>
				<div class="form-group">
					<label for="status" class="col-sm-2 control-label"> 状态 </label>
					<div class="col-sm-10">

						<c:if test="${bean.status ne 5 && bean.status ne 6}">
							<label class="radio-inline"> <input name="status"
								type="radio" class="" checked value="1" />正常
							</label>
						</c:if>
						<c:if test="${bean.status ne 6 }">
							<label class="radio-inline"> <input name="status"
								type="radio" class=""
								<c:if test="${bean.status eq 5 }" >checked</c:if> value="5" />休学
							</label>
						</c:if>
						<label class="radio-inline"> <input name="status"
							type="radio" class=""
							<c:if test="${bean.status eq 6 }" >checked</c:if> value="6" />退学
						</label>
					</div>
				</div>
				<div class="form-group">
					<label for="" class="col-sm-2 control-label"></label>
					<div class="col-sm-10">
						<i class="text-danger">除休学和退学其他都视为正常状态，休学时修改班级即可改变状态，退学时状态不可改</i>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="submit" class="btn btn-primary">修改</button>
						<!-- <a href="javascript:history.back();" class="btn btn-default">返回</a> -->
					</div>
				</div>
				<!-- 分页信息 -->
				<input type="hidden" name="nameValue" value="${nameValue }" /> <input
					type="hidden" name="studentId" value="${studentId }" /> <input
					type="hidden" name="studentStatus" value="${studentStatus }" /> <input
					type="hidden" name="classValue" value="${classValue }" /> <input
					type="hidden" name="productValue" value="${productValue }" /> <input
					type="hidden" name="pageNum" value="${pageNum }" /> <input
					type="hidden" name="pageSize" value="${pageSize }" />

			</form>
			<div class="modal fade" id="classSelect" tabindex="-1" role="dialog">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
							<h4 class="modal-title">选择班级</h4>
						</div>
						<div class="modal-body form-inline" style="overflow: hidden;">
							<div class="col-md-12">
								<div class="panel panel-default">
									<div class="panel-heading">搜索条件</div>
									<div class="panel-body">
										<div class="form-group">
											<label for="type.value">班级名称：</label> <input type="text"
												class="form-control" id="className" />
										</div>
										<div class="form-group">
											<label for="type.value">产品：</label> <select id="productId"
												class="form-control">
												<option value="">所有</option>
												<c:forEach items="#{products }" var="product">
													<option value="${product.id }">${product.name }</option>
												</c:forEach>
											</select>
										</div>
										<button class="selectClass btn btn-default">搜索</button>
									</div>
								</div>
							</div>
							<div class="col-md-12">
								<table id="classForm" class="table table-hover table-border"></table>
							</div>
						</div>
						<div class="modal-footer"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>